#ifndef SHADER_H
#define SHADER_H

#include <string>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

struct Shader {
    unsigned int id;

    void init(const char* vertexFile, const char* fragmentFile);

    // use/activate the shader
    const Shader &use() const;

    // utility uniform functions
    const Shader &set(const std::string &name, bool value) const;
    const Shader &set(const std::string &name, int value) const;
    const Shader &set(const std::string &name, float value) const;
    const Shader &set(const std::string &name, float v1, float v2, float v3, float v4) const;
    const Shader &set(const std::string &name, const glm::mat4 &mat) const;
};

#endif // SHADER_H
